The speed and efficiency of many computing applications depends upon the availability of processing resources. To this end, computing architectures such as the “virtual machine” design, developed by International Business Machines Corporation, share common processing resources among multiple processes. Such an architecture may conventionally rely upon a single computing machine having one or more physical controllers, or central processing units (CPUs). The CPUs may execute software configured to simulate multiple virtual processors.
Such multiprocessor environments support the conceptual practice of logical “partitioning.” Partitioning provides a programmed architecture suited for assignment and sharing computing assets. A partition may logically comprise a portion of a machine's CPUs, memory and other resources, as assigned by an administrator. As such, an administrator may allocate the same resources to more than one partition. Each partition may additionally host an operating system, in addition to multiple virtual processors. In this manner, each partition operates largely as if it is a separate computer.
In principle, each virtual processor may access many of the physical resources of the underlying physical machine. Exemplary resources may include memory assets and hardware registers, in addition to the CPUs. Virtual processors may additionally share a priority scheme or schedule that partially dictates allocation of processing cycles as between different virtual processors. An underlying program called a “hypervisor,” or partition manager, may use this scheme to assign and dispatch CPUs to each virtual processor. For instance, the hypervisor may intercept requests for resources from operating systems to globally share and allocate them.
In this manner, virtual processors act as logical threads of execution for a host partition. As such, the virtual processors can separately execute instructions, while sharing resources. By duplicating the utilization of some physical assets, a partitioned environment can promote better performance and efficiency. The programmable flexibility of partitions may further allow them to respond to changes in load dynamically without rebooting. For example, each of two partitions containing ten virtual processors may take over all ten CPUs of a shared physical system as workload shifts without requiring a re-boot or operator intervention.
To promote proportionate resource allocation, an administrator may place constraints on the number of resources accessible by a virtual processor. For instance, the hypervisor may never dispatch more than fifty percent of available CPUs to a certain virtual processor. Similarly, the hypervisor may ensure that a virtual processor's use of a CPU does not exceed a specified duration. In this manner, the virtual processor may be allocated a “time slice” of a CPU, at the expiration of which, the hypervisor may preempt the virtual processor's use of the CPU. Through similar programming, a complex application can theoretically be distributed among many processors instead of waiting to be executed by a single processor.
However, despite the flexibility afforded by such multiprocessing systems, complications associated with resource allocation persist. Some such obstacles arise from the dynamic, intertwined processing requirements of operating systems. For example, the initialization of certain virtual processes may be premised upon the prior execution of other processes. Such dependency may introduce its own complexity and inefficiency into a multiprocessing application. In a shared processor environment, the same obstacles can arise for virtual processors. For instance, a hypervisor may assign a CPU to a virtual processor that is requesting a spin-lock while waiting for a prerequisite virtual processor which is holding the spin-lock to obtain its own CPU. As such, not only is the assigned CPU unable to execute the virtual processor, but it is prevented from executing other virtual processors within the partition.
Some administrators attempt to address multiprocessor inefficiency by introducing programmed yield functions. For instance, a virtual processor may issue a yield-to-active command to the hypervisor whenever the virtual processor is about to spin. A virtual processor may “spin” as it waits for a prerequisite process to execute or a resource to become available. Since the holder of the resource may not be active, the virtual processor would be wasting CPU cycles while it is spinning. In response to the yield-to-active command, the virtual processor may enter a yielded state and relinquish its CPU. The hypervisor may reallocate the yielded CPU to the next virtual processor presented on the schedule.
While such a technique represents an improvement in managing resources, it nonetheless tolerates inefficiency. Namely, yielding processes must often remain inactive for extended periods while waiting for the hypervisor to sequentially allocate CPUs to all other virtual processors. Compounded over multiple processing layers and iterations, such inactivity translates into slow processing speeds and inefficiency. Consequently, there is a need for a more effective manner of managing physical computing resources.